home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DLGoodies / lcd.dopus5 < prev    next >
Text File  |  1996-08-29  |  948b  |  45 lines

  1. /*
  2.  * -----
  3.  * lcd.dopus5
  4.  * -----
  5.  * 
  6.  *    Opens a new lister in Opus 5 showing the current directory in the
  7.  *    shell you run it from.
  8.  * 
  9.  *    by Jonathan Potter, 7th May 1995
  10.  * 
  11.  *    Sample usage :
  12.  * 
  13.  *       alias lcd "rx dopus5:rexx/lcd.dopus5"   (in shell-startup)
  14.  *       lcd                                    (from a shell)
  15.  * 
  16.  * 
  17.  * address 'DOPUS.1'
  18.  * 
  19.  * Get current directory.. there's probably an easier way of doing this 
  20.  * address command 'cd >t:temp-cd'
  21.  * 
  22.  * Open temp file 
  23.  * ok = open('in','t:temp-cd','r')
  24.  * if ok ~= 1 then exit
  25.  * 
  26.  * Read cd 
  27.  * cd = readln('in')
  28.  * 
  29.  *  Open new lister 
  30.  * lister new cd
  31.  * 
  32.  *  Bring dopus to front
  33.  * dopus front
  34.  * 
  35.  *
  36.  ************************************************************************#
  37.  *  There is indeed an easy way of doing it without clobbering T:
  38.  *  Change by David Lübbren (14.7.96).
  39.  */
  40.  
  41. address 'DOPUS.1'
  42.  
  43. lister new PRAGMA('Directory')
  44. dopus front
  45. exit